﻿@model IEnumerable<MenuPlanner.Models.Menu>

@{
    ViewData["Title"] = "Index";
}

<h2>Index</h2>

<p>
    <a asp-action="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
                <th>
                    @Html.DisplayNameFor(model => model.Text)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Price)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Active)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Order)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Type)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Day)
                </th>
            <th>
                @Html.DisplayNameFor(model => model.MenuCard)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Text)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Price)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Active)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Order)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Type)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Day)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MenuCard.Id)
            </td>
            <td>
                <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
                <a asp-action="Details" asp-route-id="@item.Id">Details</a> |
                <a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
            </td>
        </tr>
}
    </tbody>
</table>
